package br.com.sgc.entities.financeiro;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import br.com.sgc.entities.geral.Clinica;

@Entity
@Table(name = "forma_pagamento", schema="financeiro")
public class FormaPagamento implements Serializable{

	private static final long serialVersionUID = -8408510861437124117L;
	
	@Id 
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ")
	@SequenceGenerator(schema = "financeiro", initialValue = 1, name = "SEQ", sequenceName = "financeiro.seq_forma_pagamento", allocationSize = 1)
	private Long id;
	
	private String descricao;

	@Column(name = "pode_gerar_parcela")
	private Boolean podeGerarParcela;
	
	@Column(name = "dar_quitacao_automatica")
	private Boolean darQuitacaoAutomatica;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "clinica_id", referencedColumnName = "id")
	private Clinica clinica;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public Boolean getPodeGerarParcela() {
		return podeGerarParcela;
	}

	public void setPodeGerarParcela(Boolean podeGerarParcela) {
		this.podeGerarParcela = podeGerarParcela;
	}

	public Clinica getClinica() {
		return clinica;
	}

	public void setClinica(Clinica clinica) {
		this.clinica = clinica;
	}

	public Boolean getDarQuitacaoAutomatica() {
		return darQuitacaoAutomatica;
	}

	public void setDarQuitacaoAutomatica(Boolean darQuitacaoAutomatica) {
		this.darQuitacaoAutomatica = darQuitacaoAutomatica;
	}
}
